
name='heshuai'
age=18
source=100.0

print(f'名字:{name},年龄:{age},成绩:{source}')

print('名字:{0} 年龄:{1} 成绩:{2}'.format(name,age,source))

print('名字:%s,年龄:%d,成绩:%.2f'% (name,age,source))


print(name.center(30,'-'))

print('{0:*<20}'.format(name))
print('{0:->20}'.format(name))
name='heshuai'
age=18
source=100.0
#不能是数字
print(''.join([name,'加油！']))
num3='加油不要放弃，坚持自己的梦想！'
print('%s%s' % (name,'加油不要放弃，坚持自己的梦想！'))
print('{0}{1}'.format(name,'加油不要放弃，坚持自己的梦想！'))
print(f'{name} {num3}')

tong='heshuaikkheshuaikkheshuaikkheshuaikk'
new_tong=''

for item in tong:
    if item not in new_tong:
        new_tong+=item
print(new_tong)
tong='heshuaikkheshuaikkheshuaikkheshuaikk'
new_tong=''
for i in range(len(tong)):
    if tong[i] not in new_tong:
        new_tong+=tong[i]
print(new_tong)

tong='heshuaikkheshuaikkheshuaikkheshuaikk'
new_tong=''
new3=set(tong)
new4=list(new3)
new4.sort(key=tong.index)
print(''.join(new4))
